#ifndef PLAN_MANAGER_QUADRANT_WIDGET_H
#define PLAN_MANAGER_QUADRANT_WIDGET_H

#include <QWidget>
#include <QTimer>
#include "sqlite_manager.h"
#include "plan_list_item_widget.h"
#include <QTimer>
#include <QMenu>
#include <QListWidgetItem>

namespace Ui {
class PlanManagerQuadrantWidget;
}

class PlanManagerQuadrantWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PlanManagerQuadrantWidget(QWidget *parent = nullptr);
    ~PlanManagerQuadrantWidget();

    void setQuadrantName(const QString quadrantName);

private:
    void initUI();
    void initEvents();
    void initData(QString label);
    void initMenu();
    void addNewPlanItemWidget(QString uuid, QString text);

private slots:
    void onPlanListItemWidgetTextChanged(PlanListItemWidget* itemWidget);
    void onDeleteActionTriggered();

private:
    Ui::PlanManagerQuadrantWidget *ui;
    QTimer                        *m_timer;
    QMenu                         *m_itemMenu;
    QListWidgetItem               *m_currentMenuOfItem;
};

#endif // PLAN_MANAGER_QUADRANT_WIDGET_H
